package com.szrt.javaweb.order;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/order")
public class OrderController {
	
	//http://localhost:8080/mvn-springmvc-01-1609/order?id=22
	@RequestMapping(method=RequestMethod.POST)
	public String add(int id){
		System.out.println("进入新增方法....");
		return "teacher/list";
	}
	
	@RequestMapping(method=RequestMethod.DELETE)
	public String xx2(int id){
		System.out.println("进入删除方法....");
		return "teacher/list";
	}
	
	@RequestMapping(method=RequestMethod.PUT)
	public String xx3(int id){
		System.out.println("进入修改方法....");
		return "teacher/list";
	}
	
	
	//http://localhost:8080/mvn-springmvc-01-1609/order/22
	@RequestMapping(value="{id}",method=RequestMethod.GET)
	public String xx4(@PathVariable("id") int id){
		System.out.println("进入查询方法....");
		return "teacher/list";
	}

}
